package pet;

class Pet {
    private final String name;
    private final int age;
    private final int weight;
    private final int activity;
    private final int sensitivity;

    public Pet(String name, int age, int weight, int activity, int sensitivity) {
        this.name = name;
        this.age = age;
        this.weight = weight;
        this.activity = activity;
        this.sensitivity = sensitivity;
    }

    // Getter 方法
    public String getName() {
        return name;
    }

    public int getAge() {
        return age;
    }

    public int getWeight() {
        return weight;
    }

    public int getActivity() {
        return activity;
    }

    public int getSensitivity() {
        return sensitivity;
    }

    // 计算平均值
    public double getAverage() {
        return (weight + activity + sensitivity) / 3.0;
    }

    // 打印宠物信息
    public void printInfo() {
        System.out.print("Name: " + name+", ");
        System.out.print("Age: " + age + ", ");
        System.out.print("weight: " + weight + ", ");
        System.out.print("Activity: " + activity + ", ");
        System.out.print("Sensitivity: " + sensitivity + ", ");
        System.out.println("Average: " + getAverage());

    }
}
